<%- include('../layouts/head.ejs', { pageConf })%>

<%- include('../common/user_nav.ejs', { commonPageConf })%>


<div class="user-center-container clearfix">
  <div class="user-info-wrap">
    <div class="user-info-board">
      <div class="user-img">
        <img src="http://img.mp.itc.cn/upload/20170211/e4c5828ba1ce4d07be9c1d99d74c12b1_th.jpeg" alt="">
      </div>
      <h2 class="user-info-title">个人中心</h2>
      <div class="list-item nickname">昵称：<%= userAnalyseInfo.nickname%></div>
      <div class="list-item level">等级：<%= userAnalyseInfo.level%> </div>
      <div class="list-item resolve-problem-num">已解题: <%= userAnalyseInfo.resolve_num %></div>
      <div class="list-item resolve-rate">进度：<%= userAnalyseInfo.resolve_process %></div>
      <div class="list-item pass-rate">通过率：<%= userAnalyseInfo.pass_rate%></div>
      <div class="list-item advantage">最擅长的题型：<%= userAnalyseInfo.best_type %></div>
      <div class="list-item disadvantage">薄弱的题型：<%= userAnalyseInfo.disadvantage_type %></div>
    </div>
  </div>
  <div class="resolve-info-wrap">
    <h2>做题记录</h2>
    <table class="layui-table">
      <thead>
        <tr>
          <% pageConf.record_head.forEach((item, index) => { %>
          <th class="problem-th"><%= item %></th>
          <% }) %>
        </tr>
      </thead>
      <tbody>

        <% resolveRecord.forEach((item, index) => { %>
        <tr>
          <td class="problem-td"><%= index %></td>
          <td class="problem-td">
            <a href="/problem-detail/<%= item.pid%>" target="_blank" rel="noopener noreferrer">
              <%= item.pid %>
            </a>
          </td>
          <td class="problem-td">
            <a href="/problem-detail/<%= item.pid%>" target="_blank" rel="noopener noreferrer">
              <%= item.title %>
            </a>
          </td>
          <td class="problem-td"><%= item.type %></td>
          <td class="problem-td"><%= item.submit_result %></td>
          <td class="problem-td"><%= item.createdAt %></td>
        </tr>
        <% }) %>
      </tbody>
    </table>
  </div>
</div>


<%- include('../layouts/foot.ejs', { pageConf })%>